1. Field of the Invention
The present invention relates to an edge detecting method and an edge detecting device and conducts the edge detecting processing which plays a basic role especially on the image processing, and can be suitably applied to such as the special effect processing in the video production of television and motion pictures and the element recognition processing from the camera image in the FA (factory automation).
2. Description of the Related Art
Heretofore, the edge detection has been a process to find the part where the picture element value is rapidly changing between dark and light images. And since normally sudden changes occur on the outline of the object, the contour of the object can be extracted from the pictorial image depending on the result of edge detection. Therefore, edge detection has been widely utilized as the most basic processing for obtaining information from the image on the object existing in that image.
In the color images, since dark and light image exist in every primary color (e.g., red, green, and blue), heretofore the edge detection has been conducted on each primary color and if the edge is detected on any color, that picture element is regarded as an edge of the color image. This will be explained referring to the image shown in FIG. 1A. This image is a round object shown in FIG. 1B which is placed in front of the background having a horizontal line shown in FIG. 1C.
In the case of this image, the dark and light image of three primary colors, red, green, and blue become like FIG. 2A, 2B, and 2C respectively. For example, in the case of red, the picture element value of the inside of area 1 shown by oblique lines is "1.0" and the picture element value of the inside of the remaining area 2 is "0". The same will be applied to green and blue. If the edge is detected on each dark and light image, since the edge on the part where the sudden change occurs, i.e., only the place where the picture element value changes from "1.0" to "0" can be obtained as the edge, edges like FIG. 3A, 3B, and 3C corresponding to FIG. 2A, 2B, and 2C will be obtained. If the edge is detected in any one of the colors, red, green, or blue, its picture element is considered as an edge, and the edge which can be ultimately obtained will be like FIG. 3D by combining these edges.
However, since the edge obtained as described above contains a horizontal line 4 in the background and a vertical line 5 of the inside of a circle besides a contour 3 of the circle to be aimed originally, recognition of the real contour by means of the computer becomes very difficult. Like this example, the problem that unnecessary parts are detected as edges occurs in the case where there are patterns or colors and changes in lightness exist in the object and background.
Since it is common that there exist patterns and colors and changes in lightness on the object to be aimed for extraction from the image background or from within an image, it is practically impossible to extract the contour from the optional image by means of the conventional device, and in practice the contour extraction by the computer has been conducted only under limited condition, such as in the case where the background is painted with a uniform color.
Various improvements have heretofore been developed to alleviate these problems based on experience. For example, when the edge was detected in either primary color, that picture element was not only regarded as an edge but the method has been modified taking great account of lightness changes. However, since the application of dark and light image of each primary color is fixed in advance, these cannot be applied to images which did not follow the law of experience, and they were insufficient for practical use as the edge detection accuracy.